<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS引入方式</title>
    <style>
        table{
            text-align: center;
            border: 20px solid black;
            margin: auto;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <tr>
                <td>燕政奇</td>
                <td>21</td>
        
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>姓名</td>
                <td>年龄</td>
            </tr>
        </tbody>
        
    </table>
    <input type="button" value="点我试试">
    <input type="text" id="myInput" >
    <script src="js.js" type="module">
        //1. 内部脚本
        // let a = 1;
        // alert(a);
        // console.log(a);
        // let test = () => {
        //     alert("这是函数");
        // };
        // test();
        // let singer = {
        //     name:'zhou',
        //     age:48,
        //     sing(){
        //         alert("唱歌")
        //     }
        // }
        // singer.sing();
        // let json1 = JSON.stringify(singer);
        // let singer2 = JSON.parse(json1);
        // console.log(singer2);
        //获取所有的tbody中的tr标签
        // let trs = document.querySelectorAll("tr");
        // let mouse = document.querySelector("#myInput");
        // mouse.addEventListener("focus", () =>{
        //     console.log("点进去");
            
        // });
        // trs.forEach((tr) =>{ tr.addEventListener("mouseover",function(){
        //     this.style.backgroundColor = 'blue';
        // })});
        // trs.forEach((tr) => {tr.addEventListener("mouseleave", function () {
        //         this.style.backgroundColor = 'white';
        //     })});
        
    </script>
</body>
</html>